package com.fd.cloud.fdftp.fileHandle;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;


@Slf4j
@Component
@Order(value = 1)
public class MyApplicationRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("测试服务MyApplicationRunner");

        ///Users/admin/Downloads/filename_1_100000.txt
        String namePath="/app/zwt/bb.txt";
       // String namePath="C://Users//zhangwentao//Desktop/filename_1_100000.txt";
        FileReader fileReader = new FileReader(namePath,1024,30);
        fileReader.registerHanlder(new FileLineDataHandler());
        fileReader.startRead();

    }
}
